package com.wing.cms.dao;

import org.springframework.stereotype.Repository;

import com.wing.cms.domain.Portlet_C;
import com.wing.common.CommonSpringJDBC;
import com.wing.common.util.PageBean;

@Repository
public class Portlet_CDao extends CommonSpringJDBC<Portlet_C, String> {

	public PageBean findPageList(int currentPage, int pageSize, Object... args) {
		String where= " 1=1 ";
		String sql1=" SELECT * FROM cms_portletinstance_c where "+where+" ORDER BY id ASC " +
			" LIMIT "+(currentPage-1) * pageSize+","+pageSize;
		String sql2 = "select count(id) from  cms_portletinstance_c  where"+where;
		String[] sqlArray = {sql1,sql2 };
		return super.findPageList(sqlArray, currentPage, pageSize);
	}
}
